unit MultiClassMethod_dxRibbon;

interface
uses
  {$IF CompilerVersion<16}
  Graphics,
  {$ELSE}
  VCL.Graphics,
  {$IFEND}
  Classes,SysUtils,
  AcroMultiClassMethod,
  dxRibbon;

implementation

procedure Proc_TdxRibbon(ATable:IDataLocate; AComponent:TObject; ALCID,ASeqNo:String; AParams:TStringList);
var
  i:integer;
begin
  TdxRibbon(AComponent).BeginUpdate;
  try
    for i:=0 to TdxRibbon(AComponent).Tabs.Count-1 do
      TdxRibbon(AComponent).Tabs[i].Caption:=
        GetDisplayValue(ATable,TdxRibbon(AComponent).Tabs[i].Caption,
          ALCID,ASeqNo,TdxRibbon(AComponent).Tabs[i],'Caption');
  finally
    TdxRibbon(AComponent).EndUpdate;
  end;
end;

procedure BeginUpdateProc_TdxRibbon(AComponent:TObject);
begin
  TdxRibbon(AComponent).BeginUpdate;
end;

procedure EndUpdateProc_TdxRibbon(AComponent:TObject);
begin
  TdxRibbon(AComponent).EndUpdate;
end;

initialization
  AcroClassMethodStorage.RegisterClassMethod(TdxRibbon, Proc_TdxRibbon,BeginUpdateProc_TdxRibbon,EndUpdateProc_TdxRibbon);
finalization
  AcroClassMethodStorage.UnRegisterClassMethod(TdxRibbon);
end.
